
namespace Commons.Models.Functions
{
	public class ConstantFunction : AbstractFunction<double, double>
	{
		private double constant;

		public ConstantFunction(double constant)
			: base(null)
		{
			this.constant = constant;
		}

		public override double Eval(double x)
		{
			return constant;
		}
	}
}

